package com.jingdun.sport.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jingdun.sport.bean.model.PrizeAndWidgetDto;
import com.jingdun.sport.bean.model.PrizeWithWidgetDto;
import com.jingdun.sport.bean.model.Prizes;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface PrizesMapper extends BaseMapper<Prizes> {

    public void addPrize(Prizes prize);

    public Prizes getPrizeDetail(@Param("params") Map<String, Object> m);

    public void updatePrize(Prizes prize);

    public List<Map<String, Object>> getPaginationPrizes(Page<Map<String, Object>> page, @Param("params") Map<String, Object> m);

    List<PrizeAndWidgetDto> getPrizeAndWidgetByUserId(@Param("param")String userId);

    List<PrizeWithWidgetDto> getPrizeWithWidget();

    List<PrizeWithWidgetDto> getPrizeWithWidgetById(@Param("params")Set<Long> userPrizeIdSet);
}